package com.abel;

import org.apache.zookeeper.KeeperException;

import java.util.Collections;
import java.util.List;
/**
 * @author xiachao
 * @date 2019/4/3
 */
public class ListGroupWatcher extends ConnectionWatcher{

    public List<String> list(String groupName){
        String path = groupName;
        try {
            return zk.getChildren(path, false);
        } catch (KeeperException e) {
            e.printStackTrace();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return Collections.emptyList();
    }
}
